package com.adobesamples.controller.command {
  import com.adobesamples.controller.events.LogoChosenEvent;
  import com.adobesamples.state.ModelState;
  import com.adobesamples.state.model;

  public class ChangeLogoCommand {
    private var _modelState: ModelState;

    public function ChangeLogoCommand(modelState: ModelState) {
      _modelState = modelState;
    }

    public function execute(event:LogoChosenEvent):void {
      _modelState.currentConfiguration.model::changeLogo(event.logo.name, event.logo.image);
    }
  }
}